package tree;

import net.sf.json.JSONArray;

public class Main {  
    public static void main(String[] args) {  
        TreeNode[] treeNodes = new TreeNode[10];  
        treeNodes[0] = new TreeNode("1", "", "0");  
        treeNodes[1] = new TreeNode("2", "", "1");  
        treeNodes[2] = new TreeNode("3", "", "1");  
        treeNodes[3] = new TreeNode("4", "", "2");  
        treeNodes[4] = new TreeNode("5", "", "3");  
        treeNodes[5] = new TreeNode("6", "", "4");  
        treeNodes[6] = new TreeNode("7", "", "3");  
        treeNodes[7] = new TreeNode("8", "", "5");  
        treeNodes[8] = new TreeNode("9", "", "6");  
        treeNodes[9] = new TreeNode("10", "", "9");  
        TreeNode treeNode = TreeNodeMerger.merge(treeNodes);  
        JSONArray jsonArray = JSONArray.fromObject(treeNode);  
        System.out.println(jsonArray);  
        
        
        
        
    }  
}